package com.wz.project.cxtj.viewInHistory.service.impl;

import com.wz.common.utils.text.Convert;
import com.wz.project.cxtj.viewInHistory.domain.ViewInHistory;
import com.wz.project.cxtj.viewInHistory.mapper.ViewInHistoryMapper;
import com.wz.project.cxtj.viewInHistory.service.IViewInHistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 入库单据历史Service业务层处理
 * 
 * @author wz
 * @date 2022-05-20
 */
@Service
public class ViewInHistoryServiceImpl implements IViewInHistoryService 
{
    @Autowired
    private ViewInHistoryMapper viewInHistoryMapper;

    /**
     * 查询入库单据历史
     * 
     * @param stockinId 入库单据历史ID
     * @return 入库单据历史
     */
    @Override
    public ViewInHistory selectViewInHistoryById(String stockinId)
    {
        return viewInHistoryMapper.selectViewInHistoryById(stockinId);
    }

    /**
     * 查询入库单据历史列表
     * 
     * @param viewInHistory 入库单据历史
     * @return 入库单据历史
     */
    @Override
    public List<ViewInHistory> selectViewInHistoryList(ViewInHistory viewInHistory)
    {
        return viewInHistoryMapper.selectViewInHistoryList(viewInHistory);
    }

    /**
     * 新增入库单据历史
     * 
     * @param viewInHistory 入库单据历史
     * @return 结果
     */
    @Override
    public int insertViewInHistory(ViewInHistory viewInHistory)
    {
        return viewInHistoryMapper.insertViewInHistory(viewInHistory);
    }

    /**
     * 修改入库单据历史
     * 
     * @param viewInHistory 入库单据历史
     * @return 结果
     */
    @Override
    public int updateViewInHistory(ViewInHistory viewInHistory)
    {
        return viewInHistoryMapper.updateViewInHistory(viewInHistory);
    }

    /**
     * 删除入库单据历史对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteViewInHistoryByIds(String ids)
    {
        return viewInHistoryMapper.deleteViewInHistoryByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除入库单据历史信息
     * 
     * @param stockinId 入库单据历史ID
     * @return 结果
     */
    @Override
    public int deleteViewInHistoryById(String stockinId)
    {
        return viewInHistoryMapper.deleteViewInHistoryById(stockinId);
    }
}
